package qf.index;

import lombok.Data;

import java.io.Serializable;
import java.util.*;

public class En {


    @Data
    public static class C1Split implements Serializable {
        private static final long serialVersionUID = 1L;
        private Set<String> univSet = new HashSet<>();
        private Set<String> academySet = new HashSet<>();
        private Set<String> collSet = new HashSet<>();
        private Set<String> hospSet = new HashSet<>();
        private Set<String> otherSet = new HashSet<>();
    }

    @Data
    public static class UnitInfo {
        private String unit = "";
        private String info = "";
    }

    @Data
    public static class YnRecommend {
        private String yn = "";
        private String recommend = "";
    }

//    @Data
//    public static class UnitDeptAuth implements Serializable {
//        private static final long serialVersionUID = 1L;
//        private Set<String> unitSet = new HashSet<>(); // 单位的集合，含医院、大学及其它
//        private Set<String> stdUnit = new HashSet<>(); // 单位的标准名称的集合，即规范后的数据
//        private String auth = ""; // 英文的作者名称
//        private String cnAu = ""; // 中文的作者名称
//        private String info = ""; // 原始的信息
//        private String full = ""; // 原始的信息的全写
//        private String dept = ""; // 原始的科室信息
//        private String stem = ""; // STEM的科室名称
//        private String fuDan = ""; // 复旦大学排行榜中的科室名称
//        private String country = ""; // 国家的名称
//    }

    @Data
    public static class SortAuthAndUnit implements Serializable {
        private static final long serialVersionUID = 1L;
        private OriginalAndStandard auths = new OriginalAndStandard();
        private List<OriginalAndStandards> unitList = new ArrayList<>();
    }

    @Data
    public static class AuEmOrg {
        private String au;
        private String em;
        private List<String> org = new ArrayList<>();
    }

    // 实体类，用于存储指定类别的数字代号和关键词集合。category类别共分为三种：标题ti为7、关键词ky为8、摘要ab为9。
    @Data
    public static class CategoryAndInfo implements Serializable {
        private static final long serialVersionUID = 1L;
        private List<CodeAndWordList> infoList = new ArrayList<>();
        private int category = 0;
    }

    @Data
    public static class MethodAndInfo {
        String name = "";
        String info = "";
    }

    @Data
    public static class FundSaveInfo {
        List<List<String>> mustListList = new ArrayList<>();
        List<String> excludeList = new ArrayList<>();
        private String coun = "";
        private String cn = "";
        private String en = "";
        private String abbr = "";
        private String old = "";
    }

    @Data
    public static class FundInfo implements Serializable {
        private static final long serialVersionUID = 1L;
        private String info = ""; // 基金源数据
        private String fund = ""; // 提取出来的基金的名称
        private String number = ""; // 基金的编号，一般这个在规范时，应给予删除。
    }

    @Data
    public static class PubType {
        private List<Href> hrefs = new ArrayList<>();
        private String title = "";
        private int type = 0;
    }

    @Data
    public static class C1AuthUnit implements Serializable {
        private static final long serialVersionUID = 1L;
        private List<String> unitList = new ArrayList<>(); // 单位为什么是集合？因为"华中科技大学同济医学院附属协和医院"，可以拆解为"[华中科技大学同济医学院附属协和医院, 华中科技大学]"
        private String info = ""; // 这里是原始的信息，包含作者，和单位信息两部分。
        private String auth = ""; // 这里的作者，是规范后，或者叫排序后的，用于同名同姓计算用的作者。
    }

    @Data
    public static class Href {
        private String name = "";
        private String href = "";
    }

    @Data
    public static class Trans {
        private String cn = "";
        private String en = "";
        private String label = "";
    }

    @Data
    public static class AbKeyMethod {
        String a = ""; // ab
        String k = ""; // keyWord
        String discussion = ""; // discussion
        String results = ""; // results
        String methods = ""; // methods
        String background = ""; // background
    }

    @Data
    public static class InfoAndStandard {
        String info = "";
        String standard = "";
    }

    // 实体类，用于存储从标题、关键词、摘要中提取出来的疾病、药物、通路、基因等关键词。code为数字代号，药物，数字代号：1；基因，数字代号：2；通路，数字代号：3；疾病，数字代号：4。
    @Data
    public static class CodeAndWordList implements Serializable {
        private static final long serialVersionUID = 1L;
        private List<String> wordList = new ArrayList<>();
        private int code = 0;
    }

    @Data
    public static class JidInfo implements Serializable {
        private static final long serialVersionUID = 1L;
        private int jcrQuartile = 0; // scie期刊分区
        private String zkySubject = ""; // 中科院大区名称
        private double citeScore = 0.0; // 期刊cite影响因子值
        private double csSjr = 0.0; // 期刊citescore声望指数
        private double jcrIf = 0.0; // jcr(scie)期刊影响因子
        private int isBeiDa = 0; // 是否北大核心期刊收录，是为1，否为0
        private int isCs = 0; // 是否威望指数SJR期刊收录，是为1，否为0
        private int isCsCd = 0; // 是否CSCD期刊收录，是为1，否为0
        private int isJcr = 0; // 是否是sci收录期刊
        private int isPubmed = 0; // 是否PubMed期刊收录，是为1，否为0
        private int isTjy = 0; // 是否统计源期刊收录，是为1，否为0
        private int isYiiGle = 0; // 中华医学系列收录
        private int isZky = 0; // 是否中科院期刊收录，是为1，否为0
        private int zkyDaLei = 0; // 中科院大类分区最佳值
        private int isCore = 0; // 核心1，非核心0
        private int jid = 0; // 期刊唯一id号，也是期刊关联表的自增主键
        private String nlmId = ""; // ncbi的期刊id号
        private String ncbiJournal = ""; // ncbi的abbr期刊名称
        private String ncbiSubject = ""; // ncbi期刊mesh
        private String ncbiMesh = ""; // ncbi期刊学科
    }

    @Data
    public static class OriginalAndStandard implements Serializable {
        private static final long serialVersionUID = 1L;
        private String Original = "";
        private String Standard = "";
    }

    @Data
    public static class Edu implements Serializable {
        private static final long serialVersionUID = 1L;
        private String category = ""; // 学科门类
        private String subject = ""; // 一级学科
    }

    @Data
    public static class OrderInfo implements Serializable {
        private static final long serialVersionUID = 1L;
        private int order = 0; // 序号
        private String info = ""; // 信息
    }

    @Data
    public static class UCHSDC implements Serializable {
        private static final long serialVersionUID = 1L;
        private String university = "";
        private String college = "";
        private String hospital = "";
        private String society = "";
        private String department = "";
        private String country = "";
        private String info = "";
    }


    @Data
    public static class FuDanStemEdu implements Serializable {
        private static final long serialVersionUID = 1L;
        private String fuDan = "";
        private String stem = "";
        private Edu edu = new Edu();
    }

    @Data
    public static class OriginalAndStandards implements Serializable {
        private static final long serialVersionUID = 1L;
        private String Original = "";
        private List<String> Standards = new ArrayList<>();
    }

    @Data
    public static class Text implements Serializable {
        private static final long serialVersionUID = 1L;
        private List<String> aidList = new ArrayList<>();
        private List<String> mhList = new ArrayList<>();
        private List<String> isList = new ArrayList<>();
        private List<String> ptList = new ArrayList<>();
        private List<String> rnList = new ArrayList<>();
        private List<String> otList = new ArrayList<>();
        private List<String> laList = new ArrayList<>();
        private List<String> plList = new ArrayList<>();
        private List<String> lidList = new ArrayList<>();
        private List<String> grList = new ArrayList<>();
        private List<String> siList = new ArrayList<>();
        private List<String> oidList = new ArrayList<>();
        private List<String> conList = new ArrayList<>();
        private List<String> cinList = new ArrayList<>();
        private List<String> cnList = new ArrayList<>();
        private List<String> einList = new ArrayList<>();
        private List<String> gnList = new ArrayList<>();
        private List<String> iradList = new ArrayList<>();
        private List<String> efrList = new ArrayList<>();
        private List<String> gsList = new ArrayList<>();
        private List<String> pbList = new ArrayList<>();
        private List<String> uofList = new ArrayList<>();
        private List<String> uinList = new ArrayList<>();
        private List<String> rofList = new ArrayList<>();
        private List<String> rinList = new ArrayList<>();
        private List<String> sfmList = new ArrayList<>();
        private List<String> isbnList = new ArrayList<>();
        private List<String> rpfList = new ArrayList<>();
        private List<String> rpiList = new ArrayList<>();
        private List<String> ecfList = new ArrayList<>();
        private List<String> eciList = new ArrayList<>();
        private List<String> crfList = new ArrayList<>();
        private List<String> criList = new ArrayList<>();
        private List<String> oriList = new ArrayList<>();
        private List<String> spinList = new ArrayList<>();
        private List<String> drinList = new ArrayList<>();
        private List<String> ddinList = new ArrayList<>();
        private List<String> rrfList = new ArrayList<>();
        private List<AU> auList = new ArrayList<>();
        private PHST phst = new PHST();
        private String stat = "";
        private String dp = "";
        private String crdt = "";
        private String edat = "";
        private String ti = "";
        private String so = "";
        private String jt = "";
        private String pst = "";
        private String jid = "";
        private String lr = "";
        private String own = "";
        private String mhda = "";
        private String ta = "";
        private int pmid = 0;
        private String vi = "";
        private String pg = "";
        private String dcom = "";
        private String ip = "";
        private String sb = "";
        private String ab = "";
        private String dep = "";
        private String oto = "";
        private String pmc = "";
        private String pmcr = "";
        private String ci = "";
        private String cois = "";
        private String ir = "";
        private String fir = "";
        private String tt = "";
        private String rf = "";
        private String mid = "";
        private String fps = "";
        private String ps = "";
        private String oab = "";
        private String oabl = "";
        private String fed = "";
        private String ed = "";
        private String bti = "";
        private String ctdt = "";
        private String cti = "";
        private String cp = "";
        private String drdt = "";
        private String en = "";
        private List<String> rriList = new ArrayList<>();
    }

    @Data
    public static class AU implements Serializable {
        private static final long serialVersionUID = 1L;
        private String fau = "";
        private String au = "";
        private String auid = "";
        private List<String> adList = new ArrayList<>();
    }

    @Data
    public static class PHST implements Serializable {
        private static final long serialVersionUID = 1L;
        private String revised = "";
        private String pubmed = "";
        private String ecollection = "";
        private String aheadofprint = "";
        private String accepted = "";
        private String received = "";
        private String retracted = "";
        private String medline = "";
        private String entrez = "";
        private String pmcRelease = "";
    }

    @Data
    public static class C1Auth implements Serializable {
        private static final long serialVersionUID = 1L;
        private List<String> authList = new ArrayList<>(); // 原始的作者的集合
        private Set<String> unitSet = new HashSet<>(); // 单位的集合，含医院、大学及其它
        private Set<String> stdUnit = new HashSet<>(); // 单位的标准名称的集合，即规范后的数据
        private String country = ""; // 国家的中文名称
        private Set<Edu> eduSet = new HashSet<>(); // 教育部学科
        private String info = ""; // 原始的单位信息
        private String full = ""; // 原始的单位信息的全写
        private Set<String> deptSet = new HashSet<>(); // 原始的科室信息
        private Set<String> stemSet = new HashSet<>(); // STEM的科室名称
        private Set<String> fuDanSet = new HashSet<>(); // 复旦大学排行榜中的科室名称
        private int sort = 0; // 作者的排序，第一作者为1，不是计算机中的0。
    }

    @Data
    public static class FourItemsMap implements Serializable {
        private static final long serialVersionUID = 1L;
        private Map<String, Set<Integer>> keyWordAndAidSetMap = new HashMap<>();
        private Map<String, Double> keyWordAndScoreMap = new HashMap<>();
        private Map<String, Set<Integer>> unitListAndAidSetMap = new HashMap<>();
        private Map<String, Double> unitListAndScoreMap = new HashMap<>();
        private Map<String, Set<Integer>> jidAndAidSetMap = new HashMap<>();
        private Map<String, Double> jidAndScoreMap = new HashMap<>();
        private Map<String, Set<Integer>> authAndAidSetMap = new HashMap<>();
        private Map<String, Double> authAndScoreMap = new HashMap<>();
    }

    @Data
    public static class FourItems implements Serializable {
        private static final long serialVersionUID = 1L;
        private List<Integer> aidList = new ArrayList<>(); // 注意，这里是aid，是老鲍表的自增主键，用于获取论文。
        private String name = ""; // 名称，这里可以是关键词，也可以是机构（机构时，是一个List<String>转换的），也可以是期刊的唯一的id号转换的字符串。
        private double score = 0.0; // 基于中科院分区的累加得分
    }

    @Data
    public static class FourItemsList implements Serializable {
        private static final long serialVersionUID = 1L;
        private List<FourItems> keyWordList = new ArrayList<>(); // 相关关键词的集合
        private List<FourItems> unitList = new ArrayList<>(); // 相关机构的集合
        private List<FourItems> jidList = new ArrayList<>(); // 相关期刊的集合
        private List<FourItems> authList = new ArrayList<>(); // 相关作者的集合
    }

    @Data
    public static class UnivHosp implements Serializable {
        private static final long serialVersionUID = 1L;
        private Set<String> supplementarySet = new HashSet<>();
        private Set<String> removeSet = new HashSet<>();
        private Set<String> univAbbSet = new HashSet<>();
        private Set<String> univNameSet = new HashSet<>();
        private Set<String> univFullSet = new HashSet<>();
        private Set<String> collFullSet = new HashSet<>();
        private Set<String> hospNameSet = new HashSet<>();
        private Set<String> hospFullSet = new HashSet<>();
        private Set<String> clinicSet = new HashSet<>();
        private Set<String> cancerCenterSet = new HashSet<>();
        private Set<String> medicalCentreSet = new HashSet<>();
        private Set<String> nationalSet = new HashSet<>();
        private Set<String> suppNatiSet = new HashSet<>();
        private Set<String> instituteSet = new HashSet<>();
        private Set<String> departmentSet = new HashSet<>();
        private Set<String> natiNameSet = new HashSet<>();
        private Set<String> collNameSet = new HashSet<>();
        private Set<String> deptNameSet = new HashSet<>();
        private Set<String> instNameSet = new HashSet<>();
    }

    @Data
    public static class SearchList implements Serializable {
        private static final long serialVersionUID = 1L;
        private String info = "";
        private List<PidSort> pidSorts = new ArrayList<>();

    }

    @Data
    public static class PmIdYearInfo implements Serializable {
        private static final long serialVersionUID = 1L;
        private int pmId = 0;
        private int year = 0;
        private List<String> c1List = new ArrayList<>();
        private List<String> rpList = new ArrayList<>();
    }

    @Data
    public static class PidSort implements Serializable {
        private static final long serialVersionUID = 1L;
        private List<Integer> sortList = new ArrayList<>();
        private int pid = 0;
        private int py = 0;
    }

    @Data
    public static class SearchSet implements Serializable {
        private static final long serialVersionUID = 1L;
        private List<Integer> yearList = new ArrayList<>(); // 用户勾选的年份，默认近6年，即2019，2020，2021，2022，2023，2024，2025
        private int c1 = 1; // 只要第一作者，为1，默认为1，全部都要为0
        private int rp = 1; // 只要第一通讯作者，为1，默认为1，全部都要为0
        private int andOrOr = 1; // 作者和通讯之间的关系，默认为OR，为1，意思是作者是可以，通讯是也可以，两个都要（即两个都要满足为0）。
    }

    @Data
    public static class C1AuthUnitSort implements Serializable {
        private static final long serialVersionUID = 1L;
        private String info = ""; // 这里是原始的单位信息。
        private String full = ""; // 这里是原始的单位信息。
        private List<String> authList = new ArrayList<>();
        private int sort = 0; // 这里是该条记录在C1中的序号，用于区分是否是第一作者单位。
    }

    @Data
    public static class AuthListAndInfo implements Serializable {
        private static final long serialVersionUID = 1L;
        private List<String> authList = new ArrayList<>();
        private String info = "";
        private String full = "";
        private String dept = "";
    }

    @Data
    public static class TableData implements Serializable {
        private static final long serialVersionUID = 1L;
        private int pmId = 0;
        private String di = "";
        private String mesh = "";
        private String abText = "";
        private String keyword = "";
        private String title = "";
        private String journal = "";
        private int year = 1900;
        private int isCns = 0;
        private Set<String> ptSet = new HashSet<>();
        private int isChina = 0;
        private String nlmId = "";
        private List<String> countryList = new ArrayList<>();
        private List<SortAuthAndUnit> sortAuthList = new ArrayList<>();
        private List<CategoryAndInfo> drugGenePathwayDiseaseList = new ArrayList<>();
        private String info = "";
        private String ncbiMesh = ""; // ncbi期刊mesh
        private List<String> ncbiSubject = new ArrayList<>(); // ncbi期刊学科
        private double jcrIf = 0.0; // jcr(scie)期刊影响因子
        private double citeScore = 0.0; // citeScore期刊影响因子
        private int zkyDaLei = 0; // 中科院大类分区最佳值
        private int jcrQuartile = 0; // JCR分区
        private String webSite = "";
        private String lan = "";
        private String wc = ""; // WOS中的学科
        private Set<List<String>> extractTitle = new HashSet<>();
        private Set<List<String>> extractAbstract = new HashSet<>();
        private Set<List<String>> keyWordSet = new HashSet<>();
        private List<String> fundList = new ArrayList<>();
        private List<AuthListAndInfo> rpList = new ArrayList<>();
        private List<AuthListAndInfo> c1List = new ArrayList<>();
        private List<TiAuJ9> citationList = new ArrayList<>();
        private int total = 0;
        private List<String> referenceList = new ArrayList<>();
        private List<String> kwPlusList = new ArrayList<>();
    }

    @Data
    public static class TiAuJ9 implements Serializable {
        private static final long serialVersionUID = 1L;
        private String ti = "";
        private String au = "";
        private String so = "";
        private int pmId = 0;
        private int aId = 0;
    }

    @Data
    public static class MeSH {
        private Set<String> shSet = new HashSet<>();
        private Set<String> mhSet = new HashSet<>();
        private String mesh = "";
    }


}
